import HomeLayout from "layouts/HomeLayout.vue";
import ConetentLayout from "layouts/ContentLayout.vue";

const routes = [
  {
    path: "/",
    component: () => import("layouts/HomeLayout.vue"),
    children: [
      { path: "", component: () => import("pages/home/IndexPage.vue") },
    ],
  },
  // {
  //   path: "/test",
  //   component: () => import("layouts/HomeLayout.vue"),
  //   children: [
  //     { path: "", component: () => import("pages/test/SwiperTestPage.vue") },
  //   ],
  // },
  {
    path: "/swiper",
    component: () => import("layouts/HomeLayout.vue"),
    children: [
      { path: "", component: () => import("pages/test/swiperTestPage.vue") },
    ],
  },
  {
    path: "/about-us",
    component: ConetentLayout,
    children: [
      { path: "", component: () => import("pages/about-us/IndexPage.vue") },
    ],
  },
  {
    path: "/shop",
    component: ConetentLayout,
    children: [
      {
        path: "",
        component: () => import("pages/shop/IndexPage.vue"),
        redirect: "/shop/index",
        children: [
          {
            path: "index",
            component: () => import("pages/shop/ShopIndexPage.vue"),
          },
          {
            path: "shop-single",
            name: "ShopSingle",
            component: () => import("pages/shop/ShopSinglePage.vue"),
          },
          {
            path: "shop-grid",
            component: () => import("pages/shop/ShopGridPage.vue"),
          },
          {
            path: "shop-full",
            component: () => import("pages/shop/ShopFullPage.vue"),
          },
          {
            path: "shop-cart",
            name: "ShopCart",
            component: () => import("pages/shop/ShopCartPage.vue"),
          },
          {
            path: "shop-wishlist",
            component: () => import("pages/shop/ShopWishlistPage.vue"),
            meta: {
              requireAuth: true,
            },
          },
          {
            path: "shop-checkout",
            name: "ShopCheckout",
            component: () => import("pages/shop/ShopCheckoutPage.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/blog",
    component: ConetentLayout,
    children: [
      {
        path: "blog-grid",
        component: () => import("pages/blog/BlogGridPage.vue"),
      },
      {
        path: "blog-full",
        component: () => import("pages/blog/BlogFullPage.vue"),
      },
      {
        path: "single-blog",
        component: () => import("pages/blog/SingleBlogPage.vue"),
      },
    ],
  },
  {
    path: "/contact",
    component: ConetentLayout,
    children: [
      { path: "", component: () => import("pages/contact/IndexPage.vue") },
    ],
  },
  {
    path: "/user",
    component: ConetentLayout,
    children: [
      {
        path: "",
        component: () => import("pages/user/IndexPage.vue"),
        children: [
          {
            path: "login",
            name: "UserLogin",
            component: () => import("pages/user/LoginPage.vue"),
          },
          {
            path: "register",
            component: () => import("pages/user/RegisterPage.vue"),
          },
          {
            path: "forget-password",
            component: () => import("pages/user/ForgetPasswordPage.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/user/setting",
    component: ConetentLayout,
    children: [
      {
        path: "",
        component: () => import("pages/user/setting/IndexPage.vue"),
        redirect: "/user/setting/account",
        children: [
          {
            path: "account",
            component: () => import("pages/user/setting/AccountPage.vue"),
            meta: { requireAuth: true },
          },
          {
            path: "order",
            component: () => import("pages/user/setting/OrderPage.vue"),
            meta: { requireAuth: true },
          },
          {
            path: "address",
            component: () => import("pages/user/setting/AddressPage.vue"),
            meta: { requireAuth: true },
          },
        ],
      },
    ],
  },
  {
    path: "/other",
    component: ConetentLayout,
    children: [
      {
        path: "faq",
        component: () => import("pages/other/FaqPage.vue"),
      },
      {
        path: "privacy-policy",
        component: () => import("pages/other/PrivacyPolicyPage.vue"),
      },
      {
        path: "terms-conditions",
        component: () => import("pages/other/TermsConditionsPage.vue"),
      },
    ],
  },
  // Always leave this as last one,
  // but you can also remove it
  {
    path: "/:catchAll(.*)*",
    component: () => import("pages/ErrorNotFound.vue"),
  },
];

// const routes1 = [
//   {
//     path: "/",
//     component: () => import("layouts/MainLayout.vue"),
//     children: [{ path: "", component: () => import("pages/IndexPage.vue") }],
//   },

//   // Always leave this as last one,
//   // but you can also remove it
//   {
//     path: "/:catchAll(.*)*",
//     component: () => import("pages/ErrorNotFound.vue"),
//   },
// ];

export default routes;
